package com.ycb.feign;

import com.ycb.entity.Order;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * @author 黄泽群
 * @since 2023-12-11
 */
@FeignClient(
        value = "seata-order",
        contextId = "seata-order.order",
        path = "/"
)
public interface OrderClient {

    @GetMapping("list")
    List<Order> list(@RequestParam("userId") Integer id);

    @GetMapping("create")
    Order create(@RequestParam("userId") Integer userId,@RequestParam("goodsId")Integer goodsId,@RequestParam("qty")Integer qty);

}
